<script>
	
	function cancel(){
		window.close();
	}
	function save(){
		$("#frmData").submit();		
	}
</script>
<?php
	//echo $op;
	//print_r($op);
?>

<div style="border-bottom:2px solid #000;padding-bottom:5px;margin-bottom:20px">
<?php 
	$this->widget('application.components.widgets.ActionBar', 
		array("menuAlign" => "right", 
			'items' => array(
				array(
					'id' => "btnRefresh",
					'title' => "Simpan",
					'icon' => "images/action/Actions-document-save-all-icon.png",
					'callback'=>"save"
				),					
				array(
					'id' => "btnCancel",
					'title' => "Batal",
					'icon' => "images/action/Actions-dialog-cancel-icon.png",
					'callback'=>"cancel"
				),
			)
		)
	);
?>
</div>

<script>
	
	
</script>

<form id="frmData" action="index.php?r=akademik/master/kelas/edit" method="POST">	
	<input type="hidden" name="op" value="<?php echo $op ?>" readonly/>
	<input type="hidden" name="id" id="id" value="<?php echo $id ?>" readonly/>
	<div>
		<label class="form mandatory" style="width:100px"><?php echo Yii::t("label","ID")?></label><input class="disabled" type="text" id="department_id" name="department_id" value="<?php echo $department_id ?>" style="width:50px" readonly />		 
	</div>
	<div>
		<label class="form mandatory" style="width:100px"><?php echo Yii::t("label","Tingkatan")?></label><select id="tingkatan_id" name="tingkatan_id" style="width:200px">
			<?php
				$tingkatans = MTingkatan::model()->findAll("is_active = true and department_id =:deptId order by id",array(":deptId"=>$department_id));
				$tingkatan_id = $tingkatan_id =="" ? $tingkatans[0]->id : $tingkatan_id;
				foreach ($tingkatans as $tingkatan){
					echo "<option value='$tingkatan[id]'>$tingkatan[name]</option>";
				}  
			?>
		</select>
	</div>
	<div>
		<label class="form mandatory" style="width:100px"><?php echo Yii::t("label","Kelas")?></label><input type="text" id="name" name="name" value="<?php echo $name ?>" style="width:190px" />
	</div>
	
	<div>
		<label class="form" style="width:100px"><?php echo Yii::t("label","Keterangan")?></label><textarea id="keterangan" name="keterangan" style="width:300px;height:50px"><?php echo $keterangan ?></textarea>		  
	</div>
	<div><label class="form" style="width:100px"><?php echo Yii::t("label","status") ?></label><input type="checkbox"  id="is_active" name="is_active" <?php echo $is_active == true?"checked":"" ?> /></div>
	
</form>

